package com.hangzhou.welbeing.welbeinginstrument.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.view.View;
import android.widget.ImageView;

import com.hangzhou.welbeing.welbeinginstrument.R;
import com.hangzhou.welbeing.welbeinginstrument.adapter.PayAttentionCircleAdapter;
import com.hangzhou.welbeing.welbeinginstrument.inteface.OnRecyclerViewItemClickListener;
import com.hangzhou.welbeing.welbeinginstrument.utils.Utils;
import com.jcodecraeer.xrecyclerview.ProgressStyle;
import com.jcodecraeer.xrecyclerview.XRecyclerView;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;


/**
 * 时间 2017 年 08 月 27 日
 * 作者  Z2043 welbeing to hangzou com.hangzhou.welbeing.pregnant.welbeing_pregnant.activity
 *
 * @desc 关注圈子
 */
public class PayAttentionCircleActivity extends Activity {
    @Bind(R.id.activity_articles_iv_return)
    ImageView mActivityArticlesIvReturn;
    @Bind(R.id.activity_pay_attention_cicle_xrecyclerView)
    XRecyclerView mActivityPayAttentionCicleXrecyclerView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_pay_attention_cicle);
        ButterKnife.bind(this);


        Utils.setStatusBar(this,false,false);
        Utils.setStatusTextColor(true,this);

        LinearLayoutManager layoutManager = new LinearLayoutManager(this);
        layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
        mActivityPayAttentionCicleXrecyclerView.setLayoutManager(layoutManager);
        mActivityPayAttentionCicleXrecyclerView.setRefreshProgressStyle(ProgressStyle.BallSpinFadeLoader);
        mActivityPayAttentionCicleXrecyclerView.setLoadingMoreProgressStyle(ProgressStyle.BallRotate);

        mActivityPayAttentionCicleXrecyclerView.setPullRefreshEnabled(false);
        PayAttentionCircleAdapter payAttentionCircleAdapter =  new PayAttentionCircleAdapter();
        mActivityPayAttentionCicleXrecyclerView.setAdapter(payAttentionCircleAdapter);
        payAttentionCircleAdapter.setOnItemClickListener(new OnRecyclerViewItemClickListener() {
            @Override
            public void onItemClick(View view) {
                Intent intent = new Intent(PayAttentionCircleActivity.this,FocusVideoActivity.class);
                startActivity(intent);
            }

            @Override
            public void onItemFirstButtonClick(View v, int position) {

            }
        });
    }

    @OnClick(R.id.activity_articles_iv_return)
    public void onViewClicked() {
        finish();
    }
}
